#include "Feature.h"

namespace LSCM
{
	Mesh::Scalar FeatureSet::s_count = 0;

	void FeatureSet::clear()
	{
		m_halfedges.clear();
		m_totalValue = 0;
	}

	bool FeatureSet::add(const Mesh::HalfedgeHandle &halfedge, Mesh::Scalar value)
	{
		m_halfedges.push_back(halfedge);
		m_totalValue += value;

		return true;
	}

	bool FeatureSet::contains(const Mesh::HalfedgeHandle &halfedge) const
	{
		return std::find(m_halfedges.begin(), m_halfedges.end(), halfedge) != m_halfedges.end();
	}
}